package com.bigtotoro.shuiyincamera.model;

import com.bigtotoro.shuiyincamera.R;

import org.litepal.crud.LitePalSupport;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * 我的作品
 */

public class MyArt extends LitePalSupport{
    private long id;
    private String path;
    private String thumb; //缩略图
    private int width;
    private int height;
    private String create_time;
    private int type = 0;//image video audio
    private int duration = 0;//image video

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getTrueCreateTime() {
        return create_time;
    }

    public String getCreate_time() {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日 HH:mm");
        String newDate;
            Date date = new Date(Long.valueOf(create_time));
//            Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(String.valueOf(Long.parseLong(create_time)));
            newDate = sdf.format(date);
            return newDate;
    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }


    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }
}
